class Solution
{
public:
    int vowelStrings(vector<string> &words, int left, int right)
    {
        auto isVowel = [](char c)
        {
            return c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u';
        };
        int count = 0;
        for (int i = left; i <= right; ++i)
        {
            if (isVowel(words[i][0]) && isVowel(words[i][words[i].size() - 1]))
            {
                ++count;
            }
        }
        return count;
    }
};